﻿using System.Collections.Generic;
using System.Linq;

namespace Xc.DataAccess.Docs.MarkDowns
{
    public class MarkDataTable
    {
        /// <summary>
        /// 列信息
        /// </summary>
        public List<Column> Columns { get; set; } = new List<Column>();
        /// <summary>
        /// 行数据
        /// </summary>
        public List<string[]> Rows { get; set; }=new List<string[]>();
        /// <summary>
        /// 附加行
        /// </summary>
        /// <param name="column"></param>
        /// <returns></returns>
        public MarkDataTable AppendColumn(Column column)
        {
            Columns.Add(column);
            return this;
        }
        /// <summary>
        /// 添加一行数据
        /// </summary>
        /// <param name="rows"></param>
        /// <returns></returns>
        public MarkDataTable AppendRow(params string[] rows)
        {
            Rows.Add(rows);
            return this;
        }
    }
}
